hipblas
authorSamuel Thibault <sthibault@debian.org>
Wed, 2 Apr 2025 18:01:07 +0000 (20:01 +0200)
committerSamuel Thibault <sthibault@debian.org>
Wed, 2 Apr 2025 18:01:07 +0000 (20:01 +0200)
commit 38fafed3467998b1d635d0c15f089911901bff60
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Tue Feb 4 09:27:39 2025 +0100

    Fix building with hip but without hipblas

    starpu_hipblas_get_local_handle() will not be useful in that case
    anyway. starpu_hipblas_init/shutdown being available is however
    convenient.

    (cherry picked from commit 1807cc564683ed2d7ab403350faef6e10de4d996)

Gbp-Pq: Name hipblas

include/starpu_config.h.in
include/starpu_hipblas.h

index e4ec272df52a7aebd8d76346559e51bcfea2baa4..17310e2d57cc3f113de932d597cb6b95e6476ae0 100644 (file)
 */
 #undef STARPU_USE_HIPBLAS
 
+/**
+   Defined when StarPU has been installed with
+   HIP BLAS support. It should be used in your code to detect the
+   availability of HIP BLAS.
+   @ingroup API_HIP_Extensions
+*/
+#undef STARPU_USE_HIPBLAS
+
 /**
    Defined when StarPU has been installed with
    NVidia-ML support. It should be used in your code to detect the
index 1c2883d438aa3ad0d94f846d252d35c5362c3070..df7c00b2e024923648e85d76f709f1ed106053a8 100644 (file)
 #ifndef __STARPU_HIPBLAS_H__
 #define __STARPU_HIPBLAS_H__
 
+#ifdef STARPU_USE_HIP
+#ifdef STARPU_USE_HIPBLAS
+#include <hipblas/hipblas.h>
+#endif
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -36,10 +42,7 @@ extern "C" {
 void starpu_hipblas_init(void);
 
 #ifdef STARPU_USE_HIP
-#ifndef STARPU_USE_HIPBLAS
-typedef void* hipblasHandle_t;
-#endif
-
+#ifdef STARPU_USE_HIPBLAS
 /**
    Return the HIPBLAS handle to be used to queue HIPBLAS kernels. It
    is properly initialized and configured for multistream by
@@ -47,6 +50,7 @@ typedef void* hipblasHandle_t;
 */
 hipblasHandle_t starpu_hipblas_get_local_handle(void);
 #endif
+#endif
 
 /**
    Synchronously deinitialize the HIPBLAS library on